/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ASintactico;
import java.util.HashMap;
/**
 *
 * @author Administrador
 */
public class first { 


    //HashSet primitiveType=new HashSet();
    // private HashMap<String,String> tabla = new HashMap<String,String>();
    HashMap <String,Integer> nombresMetodosInt=new HashMap<String,Integer>();
    HashMap <String,String> Start =new HashMap<String,String>();
    HashMap <String,String> ClassDef =new HashMap<String,String>();
    HashMap <String,String> ClassExp =new HashMap<String,String>();
    HashMap <String,String> Hierarchy =new HashMap<String,String>();
    //HashMap <String,String> HeaderCtor =new HashMap<String,String>();
    
    //HashMap <String,String> ListaConstructorDef =new HashMap<String,String>();
    //HashMap <String,String> ListaCtor =new HashMap<String,String>();
    //HashMap <String,String> HeaderMethod =new HashMap<String,String>();    
    //HashMap <String,String> ListaMethodsDef =new HashMap<String,String>();    
    //HashMap <String,String> ListaMethod =new HashMap<String,String>();    
    HashMap <String,String> ListaField =new HashMap<String,String>();
    //HashMap <String,String> Field =new HashMap<String,String>();    
    //HashMap <String,String> VarDeclaratorList =new HashMap<String,String>();
    //HashMap <String,String> VarDeclaratorListFact =new HashMap<String,String>();    
    HashMap <String,String> ClassDefList =new HashMap<String,String>();
    HashMap <String,String> ClassExpList =new HashMap<String,String>();
    HashMap <String,String> FormalArgs  =new HashMap<String,String>();    
    HashMap <String,String> FormalArgsListFact2 =new HashMap<String,String>();
    HashMap <String,String> FormalArgsList =new HashMap<String,String>();
    HashMap <String,String> FormalArgsListFact =new HashMap<String,String>();    
    HashMap <String,String> FormalArg =new HashMap<String,String>();
    HashMap <String,String> MethodType =new HashMap<String,String>();
    HashMap <String,String> Type =new HashMap<String,String>();    
    HashMap <String,String> PrimitiveType =new HashMap<String,String>();    
    HashMap <String,String> Block =new HashMap<String,String>();
    HashMap <String,String> StatementList =new HashMap<String,String>();
    HashMap <String,String> Statement =new HashMap<String,String>();    
    HashMap <String,String> IfStatement =new HashMap<String,String>();
    HashMap <String,String> IfStatementFact =new HashMap<String,String>();
    HashMap <String,String> WhileStatement =new HashMap<String,String>();
    HashMap <String,String> ForStatement =new HashMap<String,String>();    
    HashMap <String,String> StatementResto =new HashMap<String,String>();    
    HashMap <String,String> Expression =new HashMap<String,String>();
    HashMap <String,String> ExpressionFact =new HashMap<String,String>();    
    HashMap <String,String> ConditionalOrExpression =new HashMap<String,String>();
    HashMap <String,String> ConditionalOrExpressionRec =new HashMap<String,String>();
    HashMap <String,String> ConditionalAndExpression =new HashMap<String,String>();
    HashMap <String,String> ConditionalAndExpressionRec =new HashMap<String,String>();
    HashMap <String,String> EqualityExpression =new HashMap<String,String>();
    HashMap <String,String> EqualityExpressionRec =new HashMap<String,String>();
    HashMap <String,String> RelationalExpression =new HashMap<String,String>();
    HashMap <String,String> RelationalExpressionFact =new HashMap<String,String>();
    HashMap <String,String> AdditiveExpression =new HashMap<String,String>();
    HashMap <String,String> AdditiveExpressionRec =new HashMap<String,String>();
    HashMap <String,String> MultiplicativeExpression =new HashMap<String,String>();
    HashMap <String,String> MultiplicativeExpressionRec =new HashMap<String,String>();
    HashMap <String,String> UnaryExpression =new HashMap<String,String>();
    HashMap <String,String> Primary =new HashMap<String,String>();
    HashMap <String,String> PrimaryRec =new HashMap<String,String>();
    //HashMap <String,String> Restoid =new HashMap<String,String>();
    //HashMap <String,String> Restothis =new HashMap<String,String>();
    HashMap <String,String> Literal =new HashMap<String,String>();
    HashMap <String,String> ActualArg =new HashMap<String,String>();
    HashMap <String,String> ActualArgs =new HashMap<String,String>();
    HashMap <String,String> ActualArgsResto =new HashMap<String,String>();
    HashMap <String,String> ExprList =new HashMap<String,String>();
    HashMap <String,String> ExprListFact =new HashMap<String,String>();
    
    HashMap <String,String> ClassBody =new HashMap<String,String>();
    HashMap <String,String> FieldConstMethod =new HashMap<String,String>();
    HashMap <String,String> FieldMethod =new HashMap<String,String>();
    HashMap <String,String> RestoField =new HashMap<String,String>();
    HashMap <String,String> Method =new HashMap<String,String>();
    HashMap <String,String> ClassBodyConstMethod =new HashMap<String,String>();
    HashMap <String,String> ClassBodyConstMethodResto =new HashMap<String,String>();
    HashMap <String,String> ClassBodyMethod =new HashMap<String,String>();
    HashMap <String,String> ClassDefBody =new HashMap<String,String>();
    HashMap <String,String> ConstMethodDef =new HashMap<String,String>();
    HashMap <String,String> MethodDef =new HashMap<String,String>();
    HashMap <String,String> ClassDefBodyMethod =new HashMap<String,String>();
    HashMap <String,String> RestoThisFact =new HashMap<String,String>();
    HashMap <String,String> RestoThis =new HashMap<String,String>();
    HashMap <String,String> RestoId =new HashMap<String,String>();
    
    private void inicializarMapeos()
    {
       // numericType.put("int", "char");
       
       Start.put("CLASSDEF","true"); 
       ClassDef.put("CLASSDEF","true");
       ClassExp.put("CLASS","true");
       Hierarchy.put("EXTENDS", "true");
       
       ClassBody.put("BOOLEAN", "true");
       ClassBody.put("CHAR", "true");
       ClassBody.put("INT", "true");
       ClassBody.put("STRING", "true");
       ClassBody.put("ID", "true");
       ClassBody.put("VOID", "true");
       FieldConstMethod.put("PARENT_A","true");
       FieldConstMethod.put("ID","true");
       
       FieldMethod.put("COMA","true");
       FieldMethod.put("SEP","true");
       FieldMethod.put("PARENT_A","true");
       ListaField.put("ID", "true");
       
       RestoField.put("COMA","true");
       RestoField.put("SEP","true");
       
       Method.put("ID","true");
       ClassBodyConstMethod.put("VOID", "true");
       ClassBodyConstMethod.put("ID", "true");
       ClassBodyConstMethod.put("STRING", "true");
       ClassBodyConstMethod.put("INT", "true");
       ClassBodyConstMethod.put("CHAR", "true");
       ClassBodyConstMethod.put("BOOLEAN", "true");
       ClassBodyConstMethodResto.put("PARENT_A","true");
       ClassBodyConstMethodResto.put("ID","true");
       
       ClassBodyMethod.put("VOID", "true");
       ClassBodyMethod.put("ID", "true");
       ClassBodyMethod.put("STRING", "true");
       ClassBodyMethod.put("INT", "true");
       ClassBodyMethod.put("CHAR", "true");
       ClassBodyMethod.put("BOOLEAN", "true");
       
       ClassDefBody.put("VOID", "true");
       ClassDefBody.put("ID", "true");
       ClassDefBody.put("STRING", "true");
       ClassDefBody.put("INT", "true");
       ClassDefBody.put("CHAR", "true");
       ClassDefBody.put("BOOLEAN", "true");
       
       ConstMethodDef.put("PARENT_A", "true"); 
       ConstMethodDef.put("ID", "true"); 
       MethodDef.put("ID","true"); 
       ClassDefBodyMethod.put("BOOLEAN", "true");
       ClassDefBodyMethod.put("CHAR", "true");
       ClassDefBodyMethod.put("INT", "true");
       ClassDefBodyMethod.put("STRING", "true");
       ClassDefBodyMethod.put("VOID", "true");
       ClassDefBodyMethod.put("ID", "true");
       ClassDefList.put("CLASSDEF","true");
       ClassExpList.put("CLASS","true");
       FormalArgs.put("PARENT_A", "true");
       FormalArgsListFact2.put("BOOLEAN","true");
       FormalArgsListFact2.put("CHAR","true");
       FormalArgsListFact2.put("INT","true");
       FormalArgsListFact2.put("STRING","true");
       FormalArgsListFact2.put("ID", "true");
       FormalArgsListFact2.put("PARENT_C","true");
       FormalArgsList.put("BOOLEAN","true");
       FormalArgsList.put("CHAR","true");
       FormalArgsList.put("INT","true");
       FormalArgsList.put("STRING","true");
       FormalArgsList.put("ID","true");
       FormalArgsListFact.put("COMA","true");
       FormalArg.put("BOOLEAN","true");
       FormalArg.put("CHAR","true");
       FormalArg.put("INT","true");
       FormalArg.put("STRING","true");
       FormalArg.put("ID","true");
       MethodType.put("BOOLEAN", "true");
       MethodType.put("CHAR", "true");
       MethodType.put("INT", "true");
       MethodType.put("STRING", "true");
       MethodType.put("ID", "true");
       MethodType.put("VOID", "true");
       Type.put("BOOLEAN", "true");
       Type.put("CHAR", "true");
       Type.put("INT", "true");
       Type.put("STRING", "true");
       Type.put("ID", "true");
       PrimitiveType.put("BOOLEAN", "true");
       PrimitiveType.put("CHAR", "true");
       PrimitiveType.put("INT", "true");
       PrimitiveType.put("STRING", "true");
       Block.put("LLAVE_A","true");
       StatementList.put("SEP","true");
       StatementList.put("IF","true");
       StatementList.put("WHILE","true");
       StatementList.put("FOR","true");
       StatementList.put("RETURN","true");
       StatementList.put("LLAVE_A","true");
       StatementList.put("OP_SUMA","true");
       StatementList.put("OP_RESTA","true");
       StatementList.put("NOT","true");
       StatementList.put("ID","true");
       StatementList.put("THIS","true");
       StatementList.put("NULL","true");
       StatementList.put("TRUE","true");
       StatementList.put("FALSE","true");
       StatementList.put("NUM","true");//Andres ok
       StatementList.put("CHARLITERAL","true");
       StatementList.put("STRINGLITERAL","true");  
       StatementList.put("PARENT_A","true");
       StatementList.put("NEW","true");
       StatementList.put("SUPER","true");
       Statement.put("SEP","true");
       Statement.put("IF","true");
       Statement.put("WHILE","true");
       Statement.put("FOR","true");
       Statement.put("RETURN","true");
       Statement.put("LLAVE_A","true");
       Statement.put("OP_SUMA","true");
       Statement.put("OP_RESTA","true");
       Statement.put("NOT","true");
       Statement.put("ID","true");
       Statement.put("THIS","true");
       Statement.put("NULL","true");
       Statement.put("TRUE","true");
       Statement.put("FALSE","true");
       Statement.put("NUM","true");//Andres ok
       Statement.put("CHARLITERAL","true");
       Statement.put("STRINGLITERAL","true");  
       Statement.put("PARENT_A","true");
       Statement.put("NEW","true");
       Statement.put("SUPER","true");
       IfStatement.put("IF","true");
       IfStatementFact.put("ELSE","true");
       WhileStatement.put("WHILE","true");
       ForStatement.put("FOR","true");
       StatementResto.put("OP_SUMA","true");
       StatementResto.put("OP_RESTA","true");
       StatementResto.put("NOT","true");
       StatementResto.put("ID","true");
       StatementResto.put("THIS","true");
       StatementResto.put("NULL","true");
       StatementResto.put("TRUE","true");
       StatementResto.put("FALSE","true");
       StatementResto.put("NUM","true");//Andres ok
       StatementResto.put("CHARLITERAL","true");
       StatementResto.put("STRINGLITERAL","true");
       StatementResto.put("PARENT_A","true");
       StatementResto.put("NEW","true");
       StatementResto.put("SUPER","true");
       StatementResto.put("SEP","true");
       
       Expression.put("ID","true");
       Expression.put("THIS","true");
       Expression.put("NULL","true");
       Expression.put("TRUE","true");
       Expression.put("FALSE","true");
       Expression.put("NUM","true");//Andres ok
       Expression.put("CHARLITERAL","true");
       Expression.put("STRINGLITERAL","true");
       Expression.put("PARENT_A","true");
       Expression.put("NEW","true");
       Expression.put("SUPER","true");
       Expression.put("OP_SUMA","true");
       Expression.put("OP_RESTA","true");
       Expression.put("NOT","true");
       
       
       
       
       
       ExpressionFact.put("OP_ASIG","true");
       ConditionalOrExpression.put("OP_SUMA","true");
       ConditionalOrExpression.put("OP_RESTA","true");
       ConditionalOrExpression.put("NOT","true");
       ConditionalOrExpression.put("ID","true");
       ConditionalOrExpression.put("THIS","true");
       ConditionalOrExpression.put("NULL","true");
       ConditionalOrExpression.put("TRUE","true");
       ConditionalOrExpression.put("FALSE","true");
       ConditionalOrExpression.put("NUM","true");//Andres ok
       ConditionalOrExpression.put("CHARLITERAL","true");
       ConditionalOrExpression.put("STRINGLITERAL","true");
       ConditionalOrExpression.put("PARENT_A","true");
       ConditionalOrExpression.put("NEW","true");
       ConditionalOrExpression.put("SUPER","true");
       ConditionalOrExpressionRec.put("OR","true");       
       ConditionalAndExpression.put("OP_SUMA","true");
       ConditionalAndExpression.put("OP_RESTA","true");
       ConditionalAndExpression.put("NOT","true");
       ConditionalAndExpression.put("ID","true");
       ConditionalAndExpression.put("THIS","true");
       ConditionalAndExpression.put("NULL","true");
       ConditionalAndExpression.put("TRUE","true");
       ConditionalAndExpression.put("FALSE","true");
       ConditionalAndExpression.put("NUM","true");//Andres ok
       ConditionalAndExpression.put("CHARLITERAL","true");
       ConditionalAndExpression.put("STRINGLITERAL","true");
       ConditionalAndExpression.put("PARENT_A","true");
       ConditionalAndExpression.put("NEW","true");
       ConditionalAndExpression.put("SUPER","true");
       ConditionalAndExpressionRec.put("AND","true");       
       EqualityExpression.put("OP_SUMA","true");
       EqualityExpression.put("OP_RESTA","true");
       EqualityExpression.put("NOT","true");
       EqualityExpression.put("ID","true");
       EqualityExpression.put("THIS","true");
       EqualityExpression.put("NULL","true");
       EqualityExpression.put("TRUE","true");
       EqualityExpression.put("FALSE","true");
       EqualityExpression.put("NUM","true");//Andres ok
       EqualityExpression.put("CHARLITERAL","true");
       EqualityExpression.put("STRINGLITERAL","true");
       EqualityExpression.put("PARENT_A","true");
       EqualityExpression.put("NEW","true");
       EqualityExpression.put("SUPER","true");
       EqualityExpressionRec.put("DISTINTO","true");
       EqualityExpressionRec.put("IGUAL","true");
       RelationalExpression.put("OP_SUMA","true");
       RelationalExpression.put("OP_RESTA","true");
       RelationalExpression.put("NOT","true");
       RelationalExpression.put("ID","true");
       RelationalExpression.put("THIS","true");
       RelationalExpression.put("NULL","true");
       RelationalExpression.put("TRUE","true");
       RelationalExpression.put("FALSE","true");
       RelationalExpression.put("NUM","true");//Andres ok
       RelationalExpression.put("CHARLITERAL","true");
       RelationalExpression.put("STRINGLITERAL","true");
       RelationalExpression.put("PARENT_A","true");
       RelationalExpression.put("NEW","true");
       RelationalExpression.put("SUPER","true");
       RelationalExpressionFact.put("MAYOR_IGUAL","true");
       RelationalExpressionFact.put("MENOR_IGUAL","true");
       RelationalExpressionFact.put("MAYOR","true");
       RelationalExpressionFact.put("MENOR","true");
       AdditiveExpression.put("OP_SUMA","true");
       AdditiveExpression.put("OP_RESTA","true");
       AdditiveExpression.put("NOT","true");
       AdditiveExpression.put("ID","true");
       AdditiveExpression.put("THIS","true");
       AdditiveExpression.put("NULL","true");
       AdditiveExpression.put("TRUE","true");
       AdditiveExpression.put("FALSE","true");
       AdditiveExpression.put("NUM","true");//Andres ok
       AdditiveExpression.put("CHARLITERAL","true");
       AdditiveExpression.put("STRINGLITERAL","true");
       AdditiveExpression.put("PARENT_A","true");
       AdditiveExpression.put("NEW","true");
       AdditiveExpression.put("SUPER","true");
       AdditiveExpressionRec.put("OP_SUMA","true");
       AdditiveExpressionRec.put("OP_RESTA","true");
       MultiplicativeExpression.put("OP_SUMA","true");
       MultiplicativeExpression.put("OP_RESTA","true");
       MultiplicativeExpression.put("NOT","true");
       MultiplicativeExpression.put("ID","true");
       MultiplicativeExpression.put("THIS","true");
       MultiplicativeExpression.put("NULL","true");
       MultiplicativeExpression.put("TRUE","true");
       MultiplicativeExpression.put("FALSE","true");
       MultiplicativeExpression.put("NUM","true");//Andres ok
       MultiplicativeExpression.put("CHARLITERAL","true");
       MultiplicativeExpression.put("STRINGLITERAL","true");
       MultiplicativeExpression.put("PARENT_A","true");
       MultiplicativeExpression.put("NEW","true");
       MultiplicativeExpression.put("SUPER","true");
       MultiplicativeExpressionRec.put("OP_MOD","true");
       MultiplicativeExpressionRec.put("OP_DIV","true");
       MultiplicativeExpressionRec.put("OP_MULT","true");
       UnaryExpression.put("OP_SUMA","true");
       UnaryExpression.put("OP_RESTA","true");
       UnaryExpression.put("NOT","true");
       UnaryExpression.put("ID","true");
       UnaryExpression.put("THIS","true");
       UnaryExpression.put("NULL","true");
       UnaryExpression.put("TRUE","true");
       UnaryExpression.put("FALSE","true");
       UnaryExpression.put("NUM","true");//Andres ok
       UnaryExpression.put("CHARLITERAL","true");
       UnaryExpression.put("STRINGLITERAL","true");
       UnaryExpression.put("PARENT_A","true");
       UnaryExpression.put("NEW","true");
       UnaryExpression.put("SUPER","true");
       Primary.put("ID","true");
       Primary.put("THIS","true");
       Primary.put("NULL","true");
       Primary.put("TRUE","true");
       Primary.put("FALSE","true");
       Primary.put("NUM","true");//Andres ok
       Primary.put("CHARLITERAL","true");
       Primary.put("STRINGLITERAL","true");
       Primary.put("PARENT_A","true");
       Primary.put("NEW","true");
       Primary.put("SUPER","true");
       PrimaryRec.put("PUNTO","true");
       Literal.put("NULL","true");
       Literal.put("TRUE","true");
       Literal.put("FALSE","true");
       Literal.put("NUM","true");//Andres ok
       Literal.put("CHARLITERAL","true");
       Literal.put("STRINGLITERAL","true");
       
       RestoThisFact.put("PARENT_A","true");
       RestoThisFact.put("PUNTO","true");
       RestoThis.put("PUNTO","true");
       RestoId.put("PARENT_A","true");
       RestoId.put("PUNTO","true");
       
       
       //***
       
       ActualArg.put("OP_SUMA","true");
       ActualArg.put("OP_RESTA","true");
       ActualArg.put("NOT","true");
       ActualArg.put("ID","true");
       ActualArg.put("THIS","true");
       ActualArg.put("NULL","true");
       ActualArg.put("TRUE","true");
       ActualArg.put("FALSE","true");
       ActualArg.put("INT","true");
       ActualArg.put("CHARLITERAL","true");
       ActualArg.put("STRINGLITERAL","true");
       ActualArg.put("PARENT_A","true");
       ActualArg.put("NEW","true");
       ActualArg.put("SUPER","true");
       //***
       ActualArgs.put("PARENT_A","true");       
       ActualArgsResto.put("OP_SUMA","true");
       ActualArgsResto.put("OP_RESTA","true");
       ActualArgsResto.put("NOT","true");
       ActualArgsResto.put("ID","true");
       ActualArgsResto.put("THIS","true");
       ActualArgsResto.put("NULL","true");
       ActualArgsResto.put("TRUE","true");
       ActualArgsResto.put("FALSE","true");
       ActualArgsResto.put("INT","true");
       ActualArgsResto.put("CHARLITERAL","true");
       ActualArgsResto.put("STRINGLITERAL","true");
       ActualArgsResto.put("PARENT_A","true");
       ActualArgsResto.put("NEW","true");
       ActualArgsResto.put("SUPER","true");
       ActualArgsResto.put("PARENT_C","true");       
       ExprList.put("OP_SUMA","true");
       ExprList.put("OP_RESTA","true");
       ExprList.put("NOT","true");
       ExprList.put("ID","true");
       ExprList.put("THIS","true");
       ExprList.put("NULL","true");
       ExprList.put("TRUE","true");
       ExprList.put("FALSE","true");
       ExprList.put("NUM","true");
       ExprList.put("CHARLITERAL","true");
       ExprList.put("STRINGLITERAL","true");
       ExprList.put("PARENT_A","true");
       ExprList.put("NEW","true");
       ExprList.put("SUPER","true");
       ExprListFact.put("COMA","true");
       
       /*asigno un numero para cada metodo */
       nombresMetodosInt.put("Start",1);
       nombresMetodosInt.put("ClassDef",2);
       nombresMetodosInt.put("ClassExp",3);
       nombresMetodosInt.put("Hierarchy",4);
       nombresMetodosInt.put("ClassBody",5);
       nombresMetodosInt.put("ClassDefBody",6);
       nombresMetodosInt.put("FieldConstMethod",7);
       nombresMetodosInt.put("ClassBodyConstMethod",8);
       nombresMetodosInt.put("ClassBodyConstMethodResto",9);
       nombresMetodosInt.put("ClassBodyMethod",10);
       nombresMetodosInt.put("ConstMethodDef",11);
       nombresMetodosInt.put("ClassDefBodyMethod",12);
       nombresMetodosInt.put("ListaField",13);
       nombresMetodosInt.put("MethodDef",14);
       nombresMetodosInt.put("ClassDefList",15);
       nombresMetodosInt.put("ClassExpList",16);
       nombresMetodosInt.put("FormalArgs",17); 
       nombresMetodosInt.put("FormalArgsListFact2",18);
       nombresMetodosInt.put("FormalArgsList",19);
       nombresMetodosInt.put("FormalArgsListFact",20);    
       nombresMetodosInt.put("FormalArg",21);
       nombresMetodosInt.put("MethodType",22);
       nombresMetodosInt.put("Type",23);    
       nombresMetodosInt.put("PrimitiveType",24);    
       nombresMetodosInt.put("Block",25);
       nombresMetodosInt.put("StatementList",26);
       nombresMetodosInt.put("Statement",27);    
       nombresMetodosInt.put("IfStatement",28);
       nombresMetodosInt.put("IfStatementFact",29);
       nombresMetodosInt.put("WhileStatement",30);
       nombresMetodosInt.put("ForStatement",31);    
       nombresMetodosInt.put("StatementResto",32);    
       nombresMetodosInt.put("Expression",33);
       nombresMetodosInt.put("ExpressionFact",34);    
       nombresMetodosInt.put("ConditionalOrExpression",35);
       nombresMetodosInt.put("ConditionalOrExpressionRec",36);
       nombresMetodosInt.put("ConditionalAndExpression",37);
       nombresMetodosInt.put("ConditionalAndExpressionRec",38);
       nombresMetodosInt.put("EqualityExpression",39);
       nombresMetodosInt.put("EqualityExpressionRec",40);
       nombresMetodosInt.put("RelationalExpression",41);
       nombresMetodosInt.put("RelationalExpressionFact",42);
       nombresMetodosInt.put("AdditiveExpression",43);
       nombresMetodosInt.put("AdditiveExpressionRec",44);
       nombresMetodosInt.put("MultiplicativeExpression",45);
       nombresMetodosInt.put("MultiplicativeExpressionRec",46);
       nombresMetodosInt.put("UnaryExpression",47);
       nombresMetodosInt.put("Primary",48);
       nombresMetodosInt.put("PrimaryRec",49);
       nombresMetodosInt.put("RestoId",50);
       nombresMetodosInt.put("RestoThis",51);
       nombresMetodosInt.put("Literal",52);
       nombresMetodosInt.put("ActualArgs",53);
       nombresMetodosInt.put("ActualArgsResto",54);
       nombresMetodosInt.put("ExprList",55);
       nombresMetodosInt.put("ExprListFact",56);
       nombresMetodosInt.put("ActualArg",57);
       nombresMetodosInt.put("RestoThisFact",58);
       nombresMetodosInt.put("RestoField",59);
       nombresMetodosInt.put("Method",60);
       

        
       
    }

    public boolean pertenece(String nombreToken, String noTerminal)
    {

        boolean p=false;
        boolean pertenece;
        String valor="";
        //System.out.println("pertence");
        Integer nroNoTerminal=this.nombresMetodosInt.get(noTerminal);
        //System.out.println(nroNoTerminal);
        int valorTerminal=nroNoTerminal.intValue();
        
        switch (valorTerminal){
            case 1:{
                    valor=Start.get(nombreToken);
            break;
            }
            case 2:{
                    valor=ClassDef.get(nombreToken);
            break;
            }
            case 3:{
                    valor=ClassExp.get(nombreToken);
            break;
            }
            case 4:{
                    valor=Hierarchy.get(nombreToken);
            break;
            }
            case 5:{
                    valor=ClassBody.get(nombreToken);
            break;
            }
            case 6:{
                    valor=ClassDefBody.get(nombreToken);
            break;
            }
            case 7:{
                    valor=FieldConstMethod.get(nombreToken);
            break;
            }
            case 8:{
                    valor=ClassBodyConstMethod.get(nombreToken);
            break;
            }
            case 9:{
                    valor=ClassBodyConstMethodResto.get(nombreToken);
            break;
            }
            case 10:{
                    valor=ClassBodyMethod.get(nombreToken);
            break;
            }
            case 11:{
                    valor=ConstMethodDef.get(nombreToken);
            break;
            }
            case 12:{
                    valor=ClassDefBodyMethod.get(nombreToken);
            break;
            }
            case 13:{
                    valor=ListaField.get(nombreToken);
            break;
            }
            case 14:{
                    valor=MethodDef.get(nombreToken);
            break;
            }
            case 15:{
                    valor=ClassDefList.get(nombreToken);
            break;
            }
            case 16:{
                    valor=ClassExpList.get(nombreToken);
            break;
            }
            case 17:{
                    valor=FormalArgs.get(nombreToken);
            break;
            }
            case 18:{
                    valor=FormalArgsListFact2.get(nombreToken);
            break;
            }
            case 19:{
                    valor=FormalArgsList.get(nombreToken);
            break;
            }
            case 20:{
                    valor=FormalArgsListFact.get(nombreToken);
            break;
            }
            case 21:{
                    valor=FormalArg.get(nombreToken);
            break;
            }
            case 22:{
                    valor=MethodType.get(nombreToken);
            break;
            }
            case 23:{
                    valor=Type.get(nombreToken);
            break;
             }
            case 24:{
                    valor=PrimitiveType.get(nombreToken);
            break;
            }
            case 25:{
                    valor=Block.get(nombreToken);
            break;
            }
            case 26:{
                    valor=StatementList.get(nombreToken);
            break;
            }
            case 27:{
                    valor=Statement.get(nombreToken);
            break;
            }
            case 28:{
                    valor=IfStatement.get(nombreToken);
            break;
            }
            case 29:{
                    valor=IfStatementFact.get(nombreToken);
            break;
            }
            case 30:{
                    valor=WhileStatement.get(nombreToken);
            break;
            }
            case 31:{
                    valor=ForStatement.get(nombreToken);
            break;
            }
            case 32:{
                    valor=StatementResto.get(nombreToken);
            break;
            }
            case 33:{
                    valor=Expression.get(nombreToken);
            break;
            }
            case 34:{
                    valor=ExpressionFact.get(nombreToken);
            break;
            }
            case 35:{
                    valor=ConditionalOrExpression.get(nombreToken);
            break;
            }
            case 36:{
                    valor=ConditionalOrExpressionRec.get(nombreToken);
            break;
            }
            case 37:{
                    valor=ConditionalAndExpression.get(nombreToken);
            break;
            }
            case 38:{
                    valor=ConditionalAndExpressionRec.get(nombreToken);
            break;
            }
            case 39:{
                    valor=EqualityExpression.get(nombreToken);
            break;
            }
            case 40:{
                    valor=EqualityExpressionRec.get(nombreToken);
            break;
            }
            case 41:{
                    valor=RelationalExpression.get(nombreToken);
            break;
            }
            case 42:{
                    valor=RelationalExpressionFact.get(nombreToken);
            break;
            }
            case 43:{
                    valor=AdditiveExpression.get(nombreToken);
            break;
            }
            case 44:{
                    valor=AdditiveExpressionRec.get(nombreToken);
            break;
            }
            case 45:{
                    valor=MultiplicativeExpression.get(nombreToken);
            break;
            }
            case 46:{
                    valor=MultiplicativeExpressionRec.get(nombreToken);
            break;
            }
            case 47:{
                    valor=UnaryExpression.get(nombreToken);
            break;
            }
            case 48:{
                    valor=Primary.get(nombreToken);
            break;
            }
            case 49:{
                    valor=PrimaryRec.get(nombreToken);
            break;
            }
            case 50:{
                    valor=RestoId.get(nombreToken);
            break;
            }
            case 51:{
                    valor=RestoThis.get(nombreToken);
            break;
            }
            case 52:{
                    valor=Literal.get(nombreToken);
            break;
            }
            case 53:{
                    valor=ActualArgs.get(nombreToken);
            break;
            }
            case 54:{
                    valor=ActualArgsResto.get(nombreToken);
            break;
            }
            case 55:{
                    valor=ExprList.get(nombreToken);
            break;
            }
            case 56:{
                    valor=ExprListFact.get(nombreToken);
            break;
            }
            case 57:{
                    valor = ActualArg.get(nombreToken);
            break;
            }
            case 58:{
                    valor = RestoThisFact.get(nombreToken);
            break;
            }
            case 59:{
                    valor = RestoField.get(nombreToken);
            break;
            }
            case 60:{
                    valor = Method.get(nombreToken);
            break;
            }
           }//fin del case
            if(valor==null)
            {
                pertenece=false;
            }
            else
            {
                pertenece=true;
            }
    return pertenece;
    }

        

    public first()
    {
        inicializarMapeos();
    }

}
